package com.hejia.alauda.service;

import java.util.concurrent.Executor;
import com.hejia.alauda.entity.PayOrder;
import com.hejia.alauda.utils.Pager;

/**
 * 支付订单服务
 * 
 * @author hyr
 *
 */
public interface PayOrderService {

	/**
	 * 查询支付订单
	 * 
	 * @param payNumber
	 *            支付订单号
	 * @return
	 */
	PayOrder findPayOrderByPayNumber(String payNumber);

	/**
	 * 处理支付订单支付成功通知
	 * 
	 * @param payNumber
	 *            支付订单号
	 */
	void handlePayOrderSuccessNotify(Executor executor, String payNumber);

	/**
	 * 处理支付订单支付失败通知
	 * 
	 * @param payNumber
	 */
	void handlePayOrderFailureNotify(String payNumber);

	/**
	 * 查找支付订单
	 * 
	 * @param keyword
	 * @param status
	 * @param pager
	 * @return
	 */
	Pager<PayOrder> findPayOrders(String keyword, PayOrder.Status status,
			Pager<PayOrder> pager);

	/**
	 * 根据id找支付订单
	 * 
	 * @param id
	 * @return
	 */
	PayOrder findPayOrderById(long id);

}
